var request = require("request");
var $ = require("../../include/$");
var url = "http://a.apix.cn/apixlife/express/delivery";
module.exports = {
	get: function(req, res) {
		var form = {
			id: req.query.id,
			logistics: req.query.logistics
		};
		var options = {
			method: 'GET',
			url: 'http://a.apix.cn/apixlife/express/delivery',
			qs: form,
			headers: {
				'apix-key': '2227732dae8347055fb37df7ceaddd70',
				'content-type': 'application/json',
				'accept': 'application/json'
			}
		};
		request(options, function(error, response, body) {
			if (error) {
				res.send(500, error);
				return;
			};
			res.send(JSON.parse(body));
		});
	}
}